﻿using Architecture.Domain.Service;
using MediatR;
using RBAC.ZhuBoLin.Application.Command.RoleCommand;

namespace RBAC.ZhuBoLin.Application.CommandHandlers.RoleHandler
{
    public class UserDeleteCommandHandler : IRequestHandler<UserDeleteCommand, int>
    {
        private readonly IUserService userService;

        public UserDeleteCommandHandler(IUserService userService)
        {
            this.userService = userService;
        }

        public async Task<int> Handle(UserDeleteCommand request, CancellationToken cancellationToken)
        {
            return await userService.UserDel(request.uid);
        }
    }
}
